package com.ken.elmssm.mapper;

import com.ken.elmssm.bean.Food;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface FoodMapper extends BaseMapper<Food>{

    boolean add(Food object);

    @Delete("delete from food where foodId=#{foodId}")
    boolean deleteById(Integer id);

    @Update("update food set foodName=#{foodName},foodExplain=#{foodExplain},foodPrice=#{foodPrice},businessId=#{businessId}")
    boolean edit(Food object);

    boolean deleteByIds(List<Integer> ids);
}
